package com.controller;

import com.javabean.User;
import com.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.ArrayList;

@Controller
public class UserController {
    @Resource
    UserService userServiceImpl;

    @RequestMapping("/user")
    @ResponseBody
    public ArrayList<User> findUsers(){
        return userServiceImpl.findAll();
    }
}
